package com.tianji.api.client.remark.fallBack;


import com.tianji.api.client.remark.RemarkClient;
import com.tianji.common.utils.CollUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.Set;

@Slf4j
public class RemarkClientFallback implements FallbackFactory<RemarkClient> {
    @Override
    public RemarkClient create(Throwable cause) {
        return new RemarkClient() {
            /**
             * 查询用户是否点赞
             *
             * @param bizIds 业务id
             * @return
             */
            @Override
            public Set<Long> isLikeStatusAndUser(Iterable<Long> bizIds) {
                log.error("调用查询用户点赞状态Feign接口失效{}", cause);
                return CollUtils.emptySet();
            }
        };
    }
}
